#ifndef _AUDIO_H_
#define _AUDIO_H_

#include "SDL_mixer.h"
#include <string>

namespace Audio
{
	class Music;
	class Sound;

	bool init_audio();
	void cleanup_audio();

	void Play( Music* music, int loops );
	void Play( Sound* sound, int loops );

	class Music
	{
	public:
		Music();
		Music( std::string filepath );
		~Music();

		static void Pause();
		static void Resume();
		static void Stop();
	private:
		Mix_Music* music; // The SDL_Mixer music

		friend void Audio::Play( Music*, int );
	};

	class Sound
	{
	public:
		Sound();
		Sound( std::string filepath );
		~Sound();
	private:
		Mix_Chunk* chunk;
		friend void Audio::Play( Sound*, int );
	};
};

#endif